summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-11-07 23:24:13 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-11-07 23:24:13 +0100
commitbeba92693388573762e72121aa5b4d8129e2a3c7 (patch)
treeb2dd4ec84fea20e87ea0b1887dca762d5e119482
parentoops, error can also happen when not in the deleted void gap - just see diff :facepalm: (diff)
downloadbiblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.gz
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.bz2
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.lz
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.xz
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.zst
biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.zip
-rwxr-xr-xgather.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gather.py b/gather.py
index d52995c..05f35f4 100755
--- a/gather.py
+++ b/gather.py
@@ -94,6 +94,9 @@ try:
if acsm_id < guaranteed_large_acsm_id:
logger.error(f"this shouldn't happen. I have a hardcoded value that tells me that at time of program writing, acsm id {guaranteed_large_acsm_id} did exist on the server. dying anyways.")
break
+ elif r.text.startswith("Napaka pri prenosu"):
+ logger.warning(f"'napaka pri prenosu' received from http for acsm id {acsm_id}, skipping")
+ force_acsm_id = acsm_id+1
elif r.text.startswith('<error xmlns="http://ns.adobe.com/adept" data="E_URLLINK_NO_SUCH_RESOURCE resid urn:uuid:00000000-1002-0000-0009-78') or r.text.startswith('<error xmlns="http://ns.adobe.com/adept" data="E_URLLINK_NO_DISTRIBUTION_RIGHTS urn:uuid:00000000-1002-0000-0009-78'):
isbn = int([x for x in r.text.split() if x.startswith("urn:uuid:00000000-1002-0000-0009-78")][0].split("-").pop())+int(9e12)
borrow = Borrow(id=acsm_id, isbn=isbn, obtained=int(time()))